package com.cy.teducommunitys.com.cy.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cy.teducommunitys.com.common.vo.Node;
import com.cy.teducommunitys.com.cy.entity.Menu;
import com.cy.teducommunitys.com.cy.mapper.MenuMapper;
import com.cy.teducommunitys.com.cy.service.IMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 菜单 服务实现类
 * </p>
 *
 * @author mdzz
 * @since 2019-07-19
 */
@Service
public class MenuServiceImpl extends BaseServiceImpl<Menu> implements IMenuService {
    private MenuMapper mapper;
    @Autowired
    public MenuServiceImpl(MenuMapper mapper) {
        super(mapper);
        this.mapper = mapper;
    }

    @Override
    public List<Node> findZtreeMenuNodes() {
        List<Node> nodes = mapper.findZtreeMenuNodes();
        return nodes;
    }

    @Override
    public List<Map<String, Object>> findObjects() {
        List<Map<String, Object>> list = mapper.findObjects();
        return list;
    }

}